import java.util.*;

public class Main {
    public static void main(String[] args) {
        List<Employee> employees = new ArrayList<>();

        //write your code here......
        Employee employee1 = new Employee("小明", 2500);
        Employee employee2 = new Employee("小军", 8000);
        Employee employee3 = new Employee("小红", 100000);
        employees.add(employee1);
        employees.add(employee2);
        employees.add(employee3);

        for(Employee employee : employees){
            double salary = employee.getSalary();
            double ratio = 0.0;
            // 全月应纳税所得额
            double allMonth = salary < 3500 ? 0 : salary - 3500;
            if(allMonth <= 1500){
                ratio = allMonth * 0.03;
            }else if(allMonth <= 4500){
                ratio = allMonth  * 0.1 - 105;
            }else if(allMonth <= 9000){
                ratio = allMonth* 0.2 - 555;
            }else if(allMonth <= 35000){
                ratio = allMonth * 0.25 - 1005;
            }else if(allMonth <= 55000){
                ratio = allMonth * 0.30 - 2755;
            }else if(allMonth <= 80000){
                ratio = allMonth * 0.35 - 5505;
            }else{
                ratio = allMonth * 0.45 - 13505;
            }
            System.out.printf(employee.getName() + "应该缴纳的个人所得税是：%.1f", ratio);
            System.out.println();
        }

    }
}
class Employee{
    private String name;
    private double salary;
    public Employee(String name, double salary) {
        this.name = name;
        this.salary = salary;
    }
    public String getName() {
        return name;
    }

    public double getSalary() {
        return salary;
    }
}